package com.yeci.controller;


import com.yeci.entity.SysTypes;
import com.yeci.common.AjaxResult;
import com.yeci.mapper.SysTypesMapper;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author yeci
 * @since 2021-08-26
 */
@Slf4j
@RestController
@RequestMapping("/sysType")
public class SysBlogTypeController {
  @Autowired
  private SysTypesMapper typeMapper;

  /**
   * 分类列表
   * @return
   */
  @RequestMapping(value = "/list",method = RequestMethod.GET)
  public AjaxResult typeList(){
    List<SysTypes> sysBlogTypes = typeMapper.selectList(null);
    return AjaxResult.success(sysBlogTypes);
  }

}

